home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / include / user / proc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  20.4 KB  |  647 lines

  1. /*
  2.  * proc.h --
  3.  *
  4.  *    User-visible declarations for processes.
  5.  *
  6.  * Copyright 1986, 1988, 1991 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /user5/kupfer/spriteserver/include/user/RCS/proc.h,v 1.8 92/06/10 15:17:31 kupfer Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _PROCUSER
  19. #define _PROCUSER
  20.  
  21. #include <mach/thread_status.h>
  22.  
  23. /*
  24.  * Process Termination Reason flags:
  25.  *
  26.  *   PROC_TERM_EXITED        - The process has called Proc_Exit.
  27.  *   PROC_TERM_DETACHED        - The process has called Proc_Detach.
  28.  *   PROC_TERM_SIGNALED        - The process has died because of a signal.
  29.  *   PROC_TERM_DESTROYED    - The process has died because the internal
  30.  *                  state of the process was found to be
  31.  *                  invalid.
  32.  *   PROC_TERM_SUSPENDED    - The process has been suspended.
  33.  *   PROC_TERM_RESUMED        - The process has resumed execution as the
  34.  *                  result of a resume signal.
  35.  */
  36.  
  37. #define PROC_TERM_EXITED        1
  38. #define PROC_TERM_DETACHED        2
  39. #define PROC_TERM_SIGNALED        3
  40. #define PROC_TERM_DESTROYED        4
  41. #define    PROC_TERM_SUSPENDED        5
  42. #define    PROC_TERM_RESUMED        6
  43.  
  44. /*
  45.  * Reasons why a process was destroyed (PROC_TERM_DESTROYED):
  46.  * 
  47.  * PROC_BAD_STACK        - A process's user stack is invalid upon
  48.  *                  return from a signal handler.
  49.  * PROC_BAD_PSW         - The processor status word that is to be
  50.  *                  restored upon return from a signal handler
  51.  *                  has the supervisor bit set.
  52.  * PROC_VM_READ_ERROR        - The virtual memory system couldn't read from
  53.  *                  the page server.
  54.  * PROC_VM_WRITE_ERROR        - The virtual memory system couldn't write to
  55.  *                  the page server.
  56.  * PROC_EXEC_FAILED        - An exec call failed after the process's 
  57.  *                   state had been irretrievably munged.
  58.  * PROC_MACH_FAILURE        - An operation on the process's task or 
  59.  *                   thread failed unexpectedly.
  60.  */
  61.  
  62. #define    PROC_BAD_STACK            1
  63. #define    PROC_BAD_PSW            2
  64. #define    PROC_VM_READ_ERROR        3
  65. #define    PROC_VM_WRITE_ERROR        4
  66. #define PROC_EXEC_FAILED        5
  67. #define PROC_MACH_FAILURE        6
  68.  
  69. #ifndef _ASM
  70. /*
  71.  *  Definition of a process ID.
  72.  */
  73.  
  74. typedef unsigned int     Proc_PID;
  75.  
  76.  
  77.  
  78. /*
  79.  * Special values to indicate the pid of the current process, or the host on
  80.  * which it is running, respectively.
  81.  */
  82.  
  83. #define PROC_MY_PID    ((Proc_PID) 0xffffffff)
  84. #define PROC_MY_HOSTID    ((unsigned int) 0xffffffff)
  85.  
  86. /*
  87.  * Mask to extract process table index from pid.
  88.  */
  89. #define    PROC_INDEX_MASK        0x000000FF
  90.  
  91. /*
  92.  * Convert a process id into a process table index.
  93.  */
  94. #define    Proc_PIDToIndex(pid) ((pid) & PROC_INDEX_MASK)
  95.  
  96. /*
  97.  * Special parameter to Proc_Migrate to evict all processes from a
  98.  * workstation.
  99.  */
  100.  
  101. #define PROC_ALL_PROCESSES    ((Proc_PID) 0)
  102.  
  103. /*
  104.  * Special family value to indicate the process isn't in a family and 
  105.  * a macro to see if the process is in a family.
  106.  */
  107.  
  108. #define PROC_NO_FAMILY    (Proc_PID) -1
  109. #define Proc_In_A_Family(familyID) ((familyID) != PROC_NO_FAMILY)
  110.  
  111.  
  112. /*
  113.  * PROC_SUPER_USER_ID is the user ID of the omnipotent super-user and 
  114.  * PROC_NO_ID is used when specifying no id to the Proc_SetIDs call.
  115.  */
  116.  
  117. #define PROC_SUPER_USER_ID      0
  118. #define PROC_NO_ID          -1
  119.  
  120. /*
  121.  * PROC_NO_INTR_PRIORITY is used to provide system processes 
  122.  *  infinitely-high priority.
  123.  */
  124.  
  125. #define PROC_MIN_PRIORITY    -2
  126. #define PROC_MAX_PRIORITY     2
  127.  
  128. #define PROC_NO_INTR_PRIORITY     2
  129. #define PROC_HIGH_PRIORITY     1
  130. #define PROC_NORMAL_PRIORITY     0
  131. #define PROC_LOW_PRIORITY    -1
  132. #define PROC_VERY_LOW_PRIORITY    -2
  133.  
  134. /*
  135.  *  Possible states for a process.
  136.  */
  137.  
  138. typedef enum {
  139.     PROC_UNUSED,    /* The process doesn't exist yet. */
  140.     PROC_RUNNING,        /* unused; kept for compatibility */
  141.     PROC_READY,        /* The process is ready to execute. */
  142.     PROC_WAITING,    /* The process is waiting for an event to occur such
  143.              * as I/O completion or a mutex lock released. */
  144.     PROC_EXITING,    /* The process has terminated and is on the 
  145.              * exiting list. */
  146.     PROC_DEAD,        /* The process has been terminated is on the dead list*/
  147.     PROC_MIGRATED,    /* The process is running on a remote machine. */
  148.     PROC_NEW,        /* The process was just created. */
  149.     PROC_SUSPENDED    /* The process is suspended. */
  150. } Proc_State;
  151.  
  152. #define PROC_NUM_STATES    (PROC_SUSPENDED + 1) /* number of different 
  153.                           * process states */
  154.  
  155. #endif /* _ASM */
  156.  
  157.  
  158. /*
  159.  * Process attributes flags:
  160.  *
  161.  *  PROC_KERNEL               - The process is a kernel process.
  162.  *  PROC_USER                 - The process is a user process.
  163.  *  PROC_DEBUGGED        - The process is being debugged by the system
  164.  *                  debugger.
  165.  *  PROC_DEBUG_ON_EXEC        - The process will start in debugged mode.
  166.  *  PROC_DEBUG_WAIT        - A debugger is waiting for this process to go
  167.  *                  onto the debug list.
  168.  *  PROC_SINGLE_STEP_FLAG    - The process will have the trace bit set
  169.  *                  before it runs.
  170.  *  PROC_MIG_PENDING        - The process will be migrated when it
  171.  *                  completes its next trap.
  172.  *  PROC_DONT_MIGRATE        - The process should not be migrated yet, even
  173.  *                  when it traps.
  174.  *  PROC_FOREIGN        - The process has been migrated from another
  175.  *                  workstation to this one.
  176.  *  PROC_DYING            - The process is comitting hari-kari.  
  177.  *                    Implies that PROC_NO_MORE_REQUESTS is 
  178.  *                    also set.
  179.  *  PROC_LOCKED            - This process is locked.
  180.  *  PROC_NEEDS_WAKEUP        - The process's thread needs to be resumed 
  181.  *                    as part of the cleanup from a "system call".
  182.  *  PROC_MIGRATING        - The process is in the middle of migrating
  183.  *                  to another workstation.  This happens after
  184.  *                  PROC_MIG_PENDING is set but before the
  185.  *                  process's state becomes PROC_MIGRATED and
  186.  *                  its PROC_MIGRATION_DONE flag is set.
  187.  *  PROC_MIGRATION_DONE        - indicates successful completion of a
  188.  *                  migration trap.
  189.  *  PROC_ON_DEBUG_LIST        - The process is on the debug list.
  190.  *  PROC_REMOTE_EXEC_PENDING    - The process should perform an exec as part
  191.  *                  of migration.
  192.  *  PROC_MIG_ERROR        - Indicates asynchronous error before
  193.  *                  migrating process context switches.
  194.  *  PROC_EVICTING        - Indicates process is being evicted
  195.  *                  (for statistics gathering).
  196.  *  PROC_KILLING        - Indicates we're trying to kill the process
  197.  *                  but it's in the debugger.  This is a
  198.  *                  big hack to get dbx to work.
  199.  *  PROC_BEING_SERVED        - The process has made a Sprite 
  200.  *                    request (or generated an exception), 
  201.  *                    which is being serviced.
  202.  *  PROC_NO_MORE_REQUESTS    - Future requests for the process 
  203.  *                    should be dropped on the floor.  If there
  204.  *                    is a pending request, it should try to
  205.  *                    bail out.  Note: the code that sets this 
  206.  *                    flag should also set the termReason, 
  207.  *                    termStatus, and termCode for the PCB.
  208.  */
  209.  
  210. typedef int Proc_Flags;
  211.  
  212. #define PROC_KERNEL            0x000001
  213. #define PROC_USER            0x000002
  214. #define PROC_DEBUGGED            0x000004
  215. #define PROC_DEBUG_ON_EXEC        0x000008
  216. #define PROC_SINGLE_STEP_FLAG        0x000010
  217. #define PROC_DEBUG_WAIT            0x000020
  218. #define PROC_MIG_PENDING        0x000040
  219. #define PROC_DONT_MIGRATE        0x000080
  220. #define PROC_FOREIGN            0x000100
  221. #define PROC_DYING            0x000200
  222. #define PROC_LOCKED            0x000400
  223. #define PROC_NEEDS_WAKEUP        0x000800 /* was PROC_NO_VM */
  224. #define PROC_MIGRATING            0x001000
  225. #define PROC_MIGRATION_DONE        0x002000
  226. #define PROC_ON_DEBUG_LIST        0x004000
  227. #define PROC_REMOTE_EXEC_PENDING    0x008000
  228. #define PROC_MIG_ERROR            0x010000
  229. #define PROC_EVICTING            0x020000
  230. #define PROC_KILLING            0x040000
  231. #define PROC_BEING_SERVED        0x080000
  232. #define PROC_NO_MORE_REQUESTS        0x100000
  233.  
  234. /* 
  235.  * The include's must come after the definition of Proc_State (and 
  236.  * possibly some other stuff as well).  Blech.
  237.  */
  238.  
  239. #ifndef _ASM
  240. #include <sprite.h>
  241. #include <spriteTime.h>
  242. #if defined(SPRITED) || defined(KERNEL)
  243. #include <user/sig.h>
  244. #include <user/vmTypes.h>
  245. #else
  246. #include <sig.h>
  247. #include <vmTypes.h>
  248. #endif
  249.  
  250. #endif /* _ASM */
  251.  
  252. #ifndef _ASM
  253.  
  254.  
  255. /*
  256.  *  Resource usage summary for a process. 
  257.  *  Used by Proc_Wait and Proc_GetResUsage.
  258.  *
  259.  *   Preliminary version: more fields will be added when needed.
  260.  *
  261.  *  Note: the cpu usage fields use the Time format. In the process
  262.  *  control block, they are stored in the Timer_Ticks format.
  263.  *  They are converted to Time format by the system calls that return
  264.  *  resource usage info.
  265.  */
  266.  
  267. typedef struct {
  268.     Time kernelCpuUsage;    /* How much time has been spent in kernel mode*/
  269.     Time userCpuUsage;        /* How much time has been spent in user mode. */
  270.  
  271.     Time childKernelCpuUsage;    /* Sum of time spent in kernel mode for 
  272.                  * all terminated children. */
  273.     Time childUserCpuUsage;    /* Sum of time been spent in user mode for
  274.                  * all terminated children. */
  275.     int    numQuantumEnds;        /* number of times the process was
  276.                  * context switched due to a quantum end. */
  277.     int numWaitEvents;        /* number of times the process was
  278.                       * context switched due to its waiting for
  279.                  *  an event. */
  280. } Proc_ResUsage;
  281.  
  282. /*
  283.  *  Request values for use with Proc_Debug system call.
  284.  */
  285.  
  286. typedef enum {
  287.     PROC_GET_THIS_DEBUG,
  288.     PROC_GET_NEXT_DEBUG,
  289.     PROC_CONTINUE,
  290.     PROC_SINGLE_STEP,
  291.     PROC_GET_DBG_STATE,
  292.     PROC_SET_DBG_STATE,
  293.     PROC_READ,
  294.     PROC_WRITE,
  295.     PROC_DETACH_DEBUGGER
  296. } Proc_DebugReq;
  297.  
  298. /*
  299.  * Flags to Proc_Wait
  300.  *
  301.  *         PROC_WAIT_BLOCK    -    Block if there if are no stopped or
  302.  *                terminated processes.
  303.  *    PROC_WAIT_FOR_SUSPEND - Return status of children that are suspended.
  304.  *                If this option isn't specified and children
  305.  *                are stopped then it is as though they are
  306.  *                still running.
  307.  */
  308. #define    PROC_WAIT_BLOCK        0x1
  309. #define    PROC_WAIT_FOR_SUSPEND    0x2
  310.  
  311. #define PROC_NUM_GENERAL_REGS 16
  312.  
  313. typedef struct {
  314.     Proc_PID    processID;        /* Process ID of debuggee */
  315.     int    termReason;            /* Reason why process has died or
  316.                      * it has been detached. */
  317.     int    termStatus;            /* Exit/detach status or signal number
  318.                      * that caused the process to die. */
  319.     int    termCode;            /* The code for the signal. */
  320.     thread_state_data_t regState;    /* The register state of the process. */
  321.     int    sigHoldMask;            /* Mask of signals to be held. */
  322.     int    sigPendingMask;            /* Mask of pending signals. */
  323.     int    sigActions[SIG_NUM_SIGNALS];     /* Array of the different types
  324.                        of actions for signals. */
  325.     int    sigMasks[SIG_NUM_SIGNALS];     /* Array of signal hold masks for 
  326.                        signal handlers. */
  327.     int    sigCodes[SIG_NUM_SIGNALS];     /* Array of signal handlers for 
  328.                        signals. */
  329.  
  330. } Proc_DebugState;
  331.  
  332. /*
  333.  * Structure that represents one environment variable.
  334.  */
  335.  
  336. typedef struct {
  337.     char *name;        /* Variable name. */
  338.     char *value;    /* Value for variable. */
  339. } Proc_EnvironVar;
  340.  
  341. /*
  342.  * Process information. Add new fields to the end of this structure!
  343.  */
  344. typedef struct  {
  345.     int        processor;    /* Processor number the process is running on
  346.                  * or wants to run on if the processor is
  347.                  * available.  */
  348.  
  349.     Proc_State    state;        /* Describes a process's current running state.
  350.                  * >>> See Proc_State definitions above. */ 
  351.  
  352.     int        genFlags;    /* Flags to describe a processes overall state.
  353.                  * >>> See definitions below */ 
  354.  
  355.     /*
  356.      *-----------------------------------------------------------------
  357.      *
  358.      *   Various Process Identifiers.
  359.      *    
  360.      *    Note that the user and effectiveUser ID are kept here because
  361.      *    they are used for permission checking in various places.  There
  362.      *    is also a list of group IDs which is kept in the filesystem state.
  363.      *
  364.      *-----------------------------------------------------------------
  365.      */
  366.  
  367.     Proc_PID    processID;        /* Actual process ID of this
  368.                      * process (for migrated processes
  369.                      * this is different than the PID
  370.                      * that the user sees). */
  371.     Proc_PID    parentID;        /* The process ID of the parent 
  372.                      * of this process. */
  373.     int        familyID;        /* The id of the process family that 
  374.                      * this process belongs to. */
  375.     int        userID;            /* The user id is used to check access
  376.                      * rights to files and check ability
  377.                      * to signal other processes. */
  378.     int        effectiveUserID;    /* The effective user id is used
  379.                      * for setuid access. */
  380.  
  381.     /*
  382.      *-----------------------------------------------------------------
  383.      *
  384.      *    Synchronization fields.
  385.      *
  386.      * Synchronization state includes an event the process is waiting on.
  387.      *
  388.      *-----------------------------------------------------------------
  389.      */
  390.     
  391.     int         event;         /* Address of the condition variable the 
  392.                   * process is waiting for. */ 
  393.  
  394.     /*
  395.      *-----------------------------------------------------------------
  396.      *
  397.      *    Scheduling fields.
  398.      *
  399.      *-----------------------------------------------------------------
  400.      */
  401.  
  402.  
  403.     int      billingRate;    /* Modifies the scheduler's calculation of
  404.                  * the processes priority.  */
  405.     unsigned int recentUsage;    /* Amount of CPU time used recently */
  406.     unsigned int weightedUsage;    /* Smoothed avg. of CPU usage, weighted by
  407.                  * billing rate. */
  408.     unsigned int unweightedUsage; /* Smoothed avg. of CPU usage, not weighted by
  409.                    * billing rate. */
  410.  
  411.     /*
  412.      *-----------------------------------------------------------------
  413.      *
  414.      *    Accounting and Resource Usage fields.
  415.      *
  416.      *-----------------------------------------------------------------
  417.      */
  418.  
  419.     Time kernelCpuUsage;    /* How much time has been spent in kernel mode*/
  420.     Time userCpuUsage;        /* How much time has been spent in user mode. */
  421.  
  422.     Time childKernelCpuUsage;    /* Sum of time spent in kernel mode for 
  423.                       * all terminated children. */
  424.     Time childUserCpuUsage;    /* Sum of time spent in user mode for
  425.                       * all terminated children. */
  426.     int     numQuantumEnds;        /* number of times the process was 
  427.                       * context switched due to a quantum 
  428.                      * end. */
  429.     int        numWaitEvents;        /* number of times the process was
  430.                      * context switched due to its waiting 
  431.                      * for an event. */
  432.     unsigned int schedQuantumTicks;    /* Number of clock ticks until this 
  433.                      * process is due to be switched out. */
  434.  
  435.     /*
  436.      *-----------------------------------------------------------------
  437.      *
  438.      *   Virtual Memory fields.
  439.      *
  440.      *-----------------------------------------------------------------
  441.      */
  442.     Vm_SegmentID        vmSegments[VM_NUM_SEGMENTS];
  443.  
  444.  
  445.     /*
  446.      *-----------------------------------------------------------------
  447.      *
  448.      *    Signals
  449.      *
  450.      *-----------------------------------------------------------------
  451.      */
  452.  
  453.     int        sigHoldMask;        /* Mask of signals to be held. */
  454.     int        sigPendingMask;        /* Mask of pending signals. */
  455.                         /* Array of the different types
  456.                        of actions for signals. */
  457.     int        sigActions[SIG_NUM_SIGNALS];
  458.                         /* Array of signal hold masks for 
  459.                        signal handlers. */
  460.     /*
  461.      *---------------------------------------------------------------------
  462.      *
  463.      * Data for process migration.
  464.      *
  465.      *---------------------------------------------------------------------
  466.      */
  467.     int        peerHostID;         /* If on home node, ID of remote node.
  468.                       * If on remote node, ID of home node.
  469.                       * If not migrated, undefined. */
  470.     Proc_PID    peerProcessID;         /* If on remote note, process ID on
  471.                       * home node, and vice-versa. */
  472.  
  473.     unsigned int machID;        /* for use with Mach ms, vminfo, etc */
  474. } Proc_PCBInfo;
  475.  
  476. /*
  477.  * Define the maximum length of the name and value of each enviroment
  478.  * variable and the maximum size of the environment.
  479.  */
  480.  
  481. #define    PROC_MAX_ENVIRON_NAME_LENGTH    4096
  482. #define    PROC_MAX_ENVIRON_VALUE_LENGTH    4096
  483. #define    PROC_MAX_ENVIRON_SIZE        100
  484.  
  485. /*
  486.  * Define the maximum size of the first line of an interpreter file.
  487.  */
  488.  
  489. #define PROC_MAX_INTERPRET_SIZE        80
  490.  
  491. /*
  492.  * Definitions for the Proc_G/SetIntervalTimer system calls.
  493.  *
  494.  * Currently, only 1 type of timer is defined:
  495.  *  PROC_TIMER_REAL -  time between intervals is real (a.k.a wall-clock) time.
  496.  *
  497.  * The values and the structure have the same values and layout as their 
  498.  * 4.3BSD equivalents.
  499.  */
  500.  
  501. #define PROC_TIMER_REAL        0
  502. /*
  503.  * not used yet.
  504. #define PROC_TIMER_VIRTUAL    1
  505. #define PROC_TIMER_PROFILE    2
  506. */
  507.  
  508. #define PROC_MAX_TIMER        PROC_TIMER_REAL
  509.  
  510. /* 
  511.  * Warning: if you change this struct, you should also update the MIG 
  512.  * definition of Proc_TimerInterval in spriteTypes.defs.
  513.  */
  514. typedef struct {
  515.     Time    interval;    /* Amount of time between timer expirations. */
  516.     Time    curValue;    /* Amount of time till the next expiration. */
  517. } Proc_TimerInterval;
  518.  
  519. /* 
  520.  * Size of the buffer containing arguments, to be passed back to users.  
  521.  */
  522.  
  523. #define PROC_PCB_ARG_LENGTH 256
  524.  
  525. /*
  526.  * The following structure is used to transfer fixed-length argument strings
  527.  * from the kernel back to user space.  A typedef simplifies later
  528.  * declarations (and may be the only way to do it?), since 
  529.  *    char *argPtr[PROC_PCB_ARG_LENGTH]
  530.  * would be an array of pointers to strings rather than an array of strings.
  531.  */
  532.  
  533. typedef struct {
  534.     char argString[PROC_PCB_ARG_LENGTH];
  535. } Proc_PCBArgString;
  536.  
  537.  
  538. /* 
  539.  * These definitions match the MIG definitions for moving argument and
  540.  * environment strings to the server for Exec.  The strings are passed in
  541.  * an array of bytes, with an array of offsets telling where each string
  542.  * begins.
  543.  */
  544.  
  545. typedef int Proc_StringOffset;
  546. typedef Proc_StringOffset *Proc_OffsetTable;
  547. typedef char *Proc_Strings;
  548.  
  549.  
  550. /*
  551.  * Define the state of this machine w.r.t accepting migrated processes.
  552.  * A machine must always be willing to accept its own processes if they
  553.  * are migrated home.  Other than that, a host may allow migrations onto
  554.  * it under various sets of criteria, and may allow migrations away from
  555.  * it under similar sets of criteria.
  556.  *
  557.  *    PROC_MIG_IMPORT_NEVER        - never allow migrations to this host.
  558.  *    PROC_MIG_IMPORT_ROOT         - allow migrations to this host only
  559.  *                      by root.
  560.  *    PROC_MIG_IMPORT_ALL          - allow migrations by anyone.
  561.  *    PROC_MIG_IMPORT_ANYINPUT     - don't check keyboard input when
  562.  *                      determining availability.
  563.  *    PROC_MIG_IMPORT_ANYLOAD      - don't check load average when
  564.  *                      determining availability.
  565.  *    PROC_MIG_IMPORT_ALWAYS      - don't check either.
  566.  *    PROC_MIG_EXPORT_NEVER        - never export migrations from this
  567.  *                       host.
  568.  *    PROC_MIG_EXPORT_ROOT            - allow only root to export.
  569.  *    PROC_MIG_EXPORT_ALL            - allow anyone to export.
  570.  *
  571.  * For example, a reasonable default for a file server might be to import
  572.  * and export only for root; for a user's machine, it might be to allow
  573.  * anyone to migrate; and for a compute server, it might never export
  574.  * and import always regardless of load average or keyboard input.  (The
  575.  * load average would not have to be exceptionally low to determine
  576.  * availability; the host still would only be selected if the load average
  577.  * were low enough to gain something by migrating to it.)
  578.  */
  579.  
  580. #define PROC_MIG_IMPORT_NEVER              0
  581. #define PROC_MIG_IMPORT_ROOT        0x00000001
  582. #define PROC_MIG_IMPORT_ALL         0x00000003
  583. #define PROC_MIG_IMPORT_ANYINPUT    0x00000010
  584. #define PROC_MIG_IMPORT_ANYLOAD        0x00000020
  585. #define PROC_MIG_IMPORT_ALWAYS  \
  586.             (PROC_MIG_IMPORT_ANYINPUT | PROC_MIG_IMPORT_ANYLOAD)
  587. #define PROC_MIG_EXPORT_NEVER             0
  588. #define PROC_MIG_EXPORT_ROOT        0x00010000
  589. #define PROC_MIG_EXPORT_ALL        0x00030000
  590.  
  591. #define PROC_MIG_ALLOW_DEFAULT (PROC_MIG_IMPORT_ALL | PROC_MIG_EXPORT_ALL)
  592.  
  593. /*
  594.  * Library call declarations.
  595.  */
  596.  
  597. extern ReturnStatus Proc_SetExitHandler();
  598. extern void        Proc_Exit();
  599.  
  600. /*
  601.  * System call declarations.
  602.  */
  603.  
  604. extern ReturnStatus Proc_Fork();
  605. extern ReturnStatus Proc_Detach();
  606. extern ReturnStatus Proc_Wait();
  607. extern ReturnStatus Proc_RawWait();
  608. extern ReturnStatus Proc_ExecStub();
  609. extern ReturnStatus Proc_ExecEnvStub();
  610.  
  611. extern ReturnStatus Proc_GetIDsStub();
  612. extern ReturnStatus Proc_SetIDs();
  613. extern ReturnStatus Proc_GetGroupIDs();
  614. extern ReturnStatus Proc_SetGroupIDs();
  615. extern ReturnStatus Proc_GetFamilyID();
  616. extern ReturnStatus Proc_SetFamilyID();
  617.  
  618. extern ReturnStatus Proc_GetPCBInfo();
  619. extern ReturnStatus Proc_GetResUsage();
  620. extern ReturnStatus Proc_GetPriority();
  621. extern ReturnStatus Proc_SetPriority();
  622.  
  623. extern ReturnStatus Proc_Debug();
  624. extern ReturnStatus Proc_Profile();
  625.  
  626. extern ReturnStatus Proc_SetIntervalTimer();
  627. extern ReturnStatus Proc_GetIntervalTimer();
  628.  
  629. extern ReturnStatus Proc_SetEnviron();
  630. extern ReturnStatus Proc_UnsetEnviron();
  631. extern ReturnStatus Proc_GetEnvironVar();
  632. extern ReturnStatus Proc_GetEnvironRange();
  633. extern ReturnStatus Proc_InstallEnviron();
  634. extern ReturnStatus Proc_CopyEnviron();
  635.  
  636. extern ReturnStatus Proc_Migrate();
  637.  
  638. /* 
  639.  * For initial debugging, have the server share a page of memory with 
  640.  * all its clients.  This is the starting address of it.
  641.  */
  642. #define PROC_SHARED_REGION_START 0x1000000 
  643.     
  644. #endif /* _ASM */
  645.  
  646. #endif /* _PROCUSER */
  647.